package cn.faster.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 用户权限表
 * </p>
 *
 * @author xiaoCoder
 * @date 2021-06-10
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("sys_menu")
@Accessors(chain = true)
@ApiModel(value = "用户权限表")
public class SysMenu extends Model<SysMenu> {

    private static final long serialVersionUID = 1L;

    @TableId
    @ApiModelProperty("菜单Id")
    private Long id;

    @ApiModelProperty("菜单名称")
    private String name;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("更新时间")
    private Date updateTime;

    @ApiModelProperty("父菜单ID，一级菜单为0")
    private Long parentId;

    @ApiModelProperty("父菜单名称")
    @TableField(exist=false)
    private String parentName;

    @ApiModelProperty("菜单URL")
    private String url;

    @ApiModelProperty("授权(多个用逗号分隔，如：user:list,user:create)")
    private String perms;

    @ApiModelProperty("类型     0：目录   1：菜单   2：按钮")
    private Integer type;


    @ApiModelProperty("菜单图标")
    private String icon;

    @ApiModelProperty("排序")
    private String orderNum;

    @ApiModelProperty
    private Integer delFlag;


    @ApiModelProperty("ztree属性")
    @TableField(exist=false)
    private Boolean open;

    @TableField(exist=false)
    private List<?> list;

    @TableField(exist = false)
    private String index;


}